package com.aspose.cells;

class zbeb extends zcj {
   private float i = 0.0F;

   zbeb(zn var1, float var2, float var3, zbkq var4) {
      super(var1, var2, var3, var4);
   }

   void a() {
      float var1 = this.g;
      float var2 = this.h;
      float var3 = this.e.k().h();
      float var4 = this.e.k().i();
      com.aspose.cells.b.a.b.zq var5 = new com.aspose.cells.b.a.b.zq(var1, var2, var3, var4);
      com.aspose.cells.b.a.b.a.zf var6 = this.a.e();
      this.a.a(4);
      com.aspose.cells.b.a.b.zm var7 = zbul.a(this.e.m());
      com.aspose.cells.b.a.b.zo[] var8 = new com.aspose.cells.b.a.b.zo[7];
      if (this.e.l.a.size() > 0) {
         this.i = var5.i() * com.aspose.cells.b.a.ze.a((Object)((zak)this.e.l.a.get(0)).a()) / 21600.0F;
      } else {
         this.i = var5.i() * 0.24F;
      }

      com.aspose.cells.b.a.b.a.ze var9;
      com.aspose.cells.b.a.b.a.ze var11;
      if (!this.e.l().a()) {
         if (this.i == 0.0F) {
            this.a.b((com.aspose.cells.b.a.b.zc)(new com.aspose.cells.b.a.b.zu(Color.getWhite())), (com.aspose.cells.b.a.b.zq)var5);
         } else {
            switch(this.e.a) {
            case 1:
               var8[0] = new com.aspose.cells.b.a.b.zo(this.g, this.i + this.h);
               var8[1] = new com.aspose.cells.b.a.b.zo(this.i + this.g, this.h);
               var8[2] = new com.aspose.cells.b.a.b.zo(var5.h() + this.g, this.h);
               var8[3] = new com.aspose.cells.b.a.b.zo(var5.h() - this.i + this.g, this.i + this.h);
               var8[4] = new com.aspose.cells.b.a.b.zo(var5.h() + this.g, var5.i() - this.i + this.h);
               var8[5] = new com.aspose.cells.b.a.b.zo(var5.h() - this.i + this.g, var5.i() + this.h);
               var8[6] = new com.aspose.cells.b.a.b.zo(this.g, var5.i() + this.h);
               var9 = new com.aspose.cells.b.a.b.a.ze();
               var9.a(var8[0], var8[1]);
               var9.a(var8[1], var8[2]);
               var9.a(var8[2], var8[3]);
               var9.a(var8[3], var8[0]);
               var9.i();
               com.aspose.cells.b.a.b.zc var10 = zbul.a(this.e.l(), var9, 1.0F, 20.0F);
               this.a.a(var10, var9);
               var11 = new com.aspose.cells.b.a.b.a.ze();
               var11.a(var8[0], var8[3]);
               var11.a(var8[3], var8[5]);
               var11.a(var8[5], var8[6]);
               var11.a(var8[6], var8[0]);
               var11.i();
               com.aspose.cells.b.a.b.zc var12 = zbul.a(this.e.l(), var11);
               this.a.a(var12, var11);
               com.aspose.cells.b.a.b.a.ze var13 = new com.aspose.cells.b.a.b.a.ze();
               var13.a(var8[3], var8[2]);
               var13.a(var8[2], var8[4]);
               var13.a(var8[4], var8[5]);
               var13.a(var8[5], var8[3]);
               var13.i();
               com.aspose.cells.b.a.b.zc var14 = zbul.a(this.e.l(), var13, 0.8F, 0.0F);
               this.a.a(var14, var13);
               break;
            case 2:
               var8[0] = new com.aspose.cells.b.a.b.zo(this.g, var5.i() - this.i + this.h);
               var8[1] = new com.aspose.cells.b.a.b.zo(this.g, this.h);
               var8[2] = new com.aspose.cells.b.a.b.zo(var5.h() - this.i + this.g, this.h);
               var8[3] = new com.aspose.cells.b.a.b.zo(var5.h() - this.i + this.g, var5.i() - this.i + this.h);
               var8[4] = new com.aspose.cells.b.a.b.zo(var5.h() + this.g, this.i + this.h);
               var8[5] = new com.aspose.cells.b.a.b.zo(var5.h() + this.g, var5.i() + this.h);
               var8[6] = new com.aspose.cells.b.a.b.zo(this.i + this.g, var5.i() + this.h);
               com.aspose.cells.b.a.b.a.ze var15 = new com.aspose.cells.b.a.b.a.ze();
               var15.a(var8[0], var8[1]);
               var15.a(var8[1], var8[2]);
               var15.a(var8[2], var8[3]);
               var15.a(var8[3], var8[0]);
               var15.i();
               com.aspose.cells.b.a.b.zc var16 = zbul.a(this.e.l(), var15);
               this.a.a(var16, var15);
               com.aspose.cells.b.a.b.a.ze var17 = new com.aspose.cells.b.a.b.a.ze();
               var17.a(var8[3], var8[2]);
               var17.a(var8[2], var8[4]);
               var17.a(var8[4], var8[5]);
               var17.a(var8[5], var8[3]);
               var17.i();
               com.aspose.cells.b.a.b.zc var18 = zbul.a(this.e.l(), var17, 0.8F, 0.0F);
               this.a.a(var18, var17);
               com.aspose.cells.b.a.b.a.ze var19 = new com.aspose.cells.b.a.b.a.ze();
               var19.a(var8[0], var8[3]);
               var19.a(var8[3], var8[5]);
               var19.a(var8[5], var8[6]);
               var19.a(var8[6], var8[0]);
               var19.i();
               com.aspose.cells.b.a.b.zc var20 = zbul.a(this.e.l(), var19, 1.0F, 20.0F);
               this.a.a(var20, var19);
               break;
            case 3:
               var8[0] = new com.aspose.cells.b.a.b.zo(this.g, this.i + this.h);
               var8[1] = new com.aspose.cells.b.a.b.zo(this.i + this.g, this.h);
               var8[2] = new com.aspose.cells.b.a.b.zo(var5.h() + this.g, this.h);
               var8[3] = new com.aspose.cells.b.a.b.zo(var5.h() + this.g, var5.i() - this.i + this.h);
               var8[4] = new com.aspose.cells.b.a.b.zo(this.i + this.g, var5.i() - this.i + this.h);
               var8[5] = new com.aspose.cells.b.a.b.zo(this.g, var5.i() + this.h);
               var8[6] = new com.aspose.cells.b.a.b.zo(var5.h() - this.i + this.g, var5.i() + this.h);
               com.aspose.cells.b.a.b.a.ze var21 = new com.aspose.cells.b.a.b.a.ze();
               var21.a(var8[1], var8[2]);
               var21.a(var8[2], var8[3]);
               var21.a(var8[3], var8[4]);
               var21.a(var8[4], var8[1]);
               var21.i();
               com.aspose.cells.b.a.b.zc var22 = zbul.a(this.e.l(), var21);
               this.a.a(var22, var21);
               com.aspose.cells.b.a.b.a.ze var23 = new com.aspose.cells.b.a.b.a.ze();
               var23.a(var8[1], var8[4]);
               var23.a(var8[4], var8[5]);
               var23.a(var8[5], var8[0]);
               var23.a(var8[0], var8[1]);
               var23.i();
               com.aspose.cells.b.a.b.zc var24 = zbul.a(this.e.l(), var23, 0.8F, 0.0F);
               this.a.a(var24, var23);
               com.aspose.cells.b.a.b.a.ze var25 = new com.aspose.cells.b.a.b.a.ze();
               var25.a(var8[4], var8[5]);
               var25.a(var8[5], var8[6]);
               var25.a(var8[6], var8[3]);
               var25.a(var8[3], var8[4]);
               var25.i();
               com.aspose.cells.b.a.b.zc var26 = zbul.a(this.e.l(), var25, 1.0F, 20.0F);
               this.a.a(var26, var25);
               break;
            case 4:
               var8[0] = new com.aspose.cells.b.a.b.zo(this.g, this.h);
               var8[1] = new com.aspose.cells.b.a.b.zo(var5.h() - this.i + this.g, this.h);
               var8[2] = new com.aspose.cells.b.a.b.zo(var5.h() + this.g, this.i + this.h);
               var8[3] = new com.aspose.cells.b.a.b.zo(this.i + this.g, this.i + this.h);
               var8[4] = new com.aspose.cells.b.a.b.zo(var5.h() + this.g, var5.i() + this.h);
               var8[5] = new com.aspose.cells.b.a.b.zo(this.i + this.g, var5.i() + this.h);
               var8[6] = new com.aspose.cells.b.a.b.zo(this.g, var5.i() - this.i + this.h);
               com.aspose.cells.b.a.b.a.ze var27 = new com.aspose.cells.b.a.b.a.ze();
               var27.a(var8[0], var8[1]);
               var27.a(var8[1], var8[2]);
               var27.a(var8[2], var8[3]);
               var27.a(var8[3], var8[0]);
               var27.i();
               com.aspose.cells.b.a.b.zc var28 = zbul.a(this.e.l(), var27, 1.0F, 20.0F);
               this.a.a(var28, var27);
               com.aspose.cells.b.a.b.a.ze var29 = new com.aspose.cells.b.a.b.a.ze();
               var29.a(var8[3], var8[0]);
               var29.a(var8[0], var8[6]);
               var29.a(var8[6], var8[5]);
               var29.a(var8[5], var8[3]);
               var29.i();
               com.aspose.cells.b.a.b.zc var30 = zbul.a(this.e.l(), var29, 0.8F, 0.0F);
               this.a.a(var30, var29);
               com.aspose.cells.b.a.b.a.ze var31 = new com.aspose.cells.b.a.b.a.ze();
               var31.a(var8[3], var8[2]);
               var31.a(var8[2], var8[4]);
               var31.a(var8[4], var8[5]);
               var31.a(var8[5], var8[3]);
               var31.i();
               com.aspose.cells.b.a.b.zc var32 = zbul.a(this.e.l(), var31);
               this.a.a(var32, var31);
            }
         }
      }

      if (!this.e.m().a()) {
         if (this.i == 0.0F) {
            this.a.a(var7, (int)var1, (int)var2, (int)var3, (int)var4);
         } else {
            switch(this.e.a) {
            case 1:
               var9 = new com.aspose.cells.b.a.b.a.ze();
               var8[0] = new com.aspose.cells.b.a.b.zo(this.g, this.i + this.h);
               var8[1] = new com.aspose.cells.b.a.b.zo(this.i + this.g, this.h);
               var8[2] = new com.aspose.cells.b.a.b.zo(var5.h() + this.g, this.h);
               var8[3] = new com.aspose.cells.b.a.b.zo(var5.h() - this.i + this.g, this.i + this.h);
               var8[4] = new com.aspose.cells.b.a.b.zo(var5.h() + this.g, var5.i() - this.i + this.h);
               var8[5] = new com.aspose.cells.b.a.b.zo(var5.h() - this.i + this.g, var5.i() + this.h);
               var8[6] = new com.aspose.cells.b.a.b.zo(this.g, var5.i() + this.h);
               var9.a(var8[0], var8[1]);
               var9.a(var8[1], var8[2]);
               var9.a(var8[2], var8[3]);
               var9.a(var8[3], var8[0]);
               var9.a(var8[0], var8[3]);
               var9.a(var8[3], var8[5]);
               var9.a(var8[5], var8[6]);
               var9.a(var8[6], var8[0]);
               var9.a(var8[3], var8[2]);
               var9.a(var8[2], var8[4]);
               var9.a(var8[4], var8[5]);
               var9.a(var8[5], var8[3]);
               var9.i();
               this.a.a(var7, var9);
               break;
            case 2:
               com.aspose.cells.b.a.b.a.ze var33 = new com.aspose.cells.b.a.b.a.ze();
               var8[0] = new com.aspose.cells.b.a.b.zo(this.g, var5.i() - this.i + this.h);
               var8[1] = new com.aspose.cells.b.a.b.zo(this.g, this.h);
               var8[2] = new com.aspose.cells.b.a.b.zo(var5.h() - this.i + this.g, this.h);
               var8[3] = new com.aspose.cells.b.a.b.zo(var5.h() - this.i + this.g, var5.i() - this.i + this.h);
               var8[4] = new com.aspose.cells.b.a.b.zo(var5.h() + this.g, this.i + this.h);
               var8[5] = new com.aspose.cells.b.a.b.zo(var5.h() + this.g, var5.i() + this.h);
               var8[6] = new com.aspose.cells.b.a.b.zo(this.i + this.g, var5.i() + this.h);
               var33.a(var8[0], var8[1]);
               var33.a(var8[1], var8[2]);
               var33.a(var8[2], var8[3]);
               var33.a(var8[3], var8[0]);
               var33.a(var8[3], var8[2]);
               var33.a(var8[2], var8[4]);
               var33.a(var8[4], var8[5]);
               var33.a(var8[5], var8[3]);
               var33.a(var8[0], var8[3]);
               var33.a(var8[3], var8[5]);
               var33.a(var8[5], var8[6]);
               var33.a(var8[6], var8[0]);
               var33.i();
               this.a.a(var7, var33);
               break;
            case 3:
               var11 = new com.aspose.cells.b.a.b.a.ze();
               var8[0] = new com.aspose.cells.b.a.b.zo(this.g, this.i + this.h);
               var8[1] = new com.aspose.cells.b.a.b.zo(this.i + this.g, this.h);
               var8[2] = new com.aspose.cells.b.a.b.zo(var5.h() + this.g, this.h);
               var8[3] = new com.aspose.cells.b.a.b.zo(var5.h() + this.g, var5.i() - this.i + this.h);
               var8[4] = new com.aspose.cells.b.a.b.zo(this.i + this.g, var5.i() - this.i + this.h);
               var8[5] = new com.aspose.cells.b.a.b.zo(this.g, var5.i() + this.h);
               var8[6] = new com.aspose.cells.b.a.b.zo(var5.h() - this.i + this.g, var5.i() + this.h);
               var11.a(var8[1], var8[2]);
               var11.a(var8[2], var8[3]);
               var11.a(var8[3], var8[4]);
               var11.a(var8[4], var8[1]);
               var11.a(var8[1], var8[4]);
               var11.a(var8[4], var8[5]);
               var11.a(var8[5], var8[0]);
               var11.a(var8[0], var8[1]);
               var11.a(var8[4], var8[5]);
               var11.a(var8[5], var8[6]);
               var11.a(var8[6], var8[3]);
               var11.a(var8[3], var8[4]);
               var11.i();
               this.a.a(var7, var11);
               break;
            case 4:
               com.aspose.cells.b.a.b.a.ze var34 = new com.aspose.cells.b.a.b.a.ze();
               var8[0] = new com.aspose.cells.b.a.b.zo(this.g, this.h);
               var8[1] = new com.aspose.cells.b.a.b.zo(var5.h() - this.i + this.g, this.h);
               var8[2] = new com.aspose.cells.b.a.b.zo(var5.h() + this.g, this.i + this.h);
               var8[3] = new com.aspose.cells.b.a.b.zo(this.i + this.g, this.i + this.h);
               var8[4] = new com.aspose.cells.b.a.b.zo(var5.h() + this.g, var5.i() + this.h);
               var8[5] = new com.aspose.cells.b.a.b.zo(this.i + this.g, var5.i() + this.h);
               var8[6] = new com.aspose.cells.b.a.b.zo(this.g, var5.i() - this.i + this.h);
               var34.a(var8[0], var8[1]);
               var34.a(var8[1], var8[2]);
               var34.a(var8[2], var8[3]);
               var34.a(var8[3], var8[0]);
               var34.a(var8[3], var8[0]);
               var34.a(var8[0], var8[6]);
               var34.a(var8[6], var8[5]);
               var34.a(var8[5], var8[3]);
               var34.a(var8[3], var8[2]);
               var34.a(var8[2], var8[4]);
               var34.a(var8[4], var8[5]);
               var34.a(var8[5], var8[3]);
               var34.i();
               this.a.a(var7, var34);
            }
         }
      }

      this.b();
      this.a.a(var6);
   }

   void b() {
      this.a.d();
      com.aspose.cells.b.a.b.zq var1 = this.e.k();
      var1.c(var1.h() - this.i);
      if (!this.e.m().a()) {
         var1.a(-(this.e.m().f() / 2.0F), -(this.e.m().f() / 2.0F));
      }

      float var2 = zbul.a(this.e.n());
      if (this.e.p() != 7 && this.e.p() != 9) {
         if (this.e.p() == 0 || this.e.p() == 8) {
            var1.c(var1.h() - var2);
         }
      } else {
         var1.a(var1.f() + var2);
      }

      var1.a(var1.f() + (float)this.e.d().a());
      var1.b(var1.g() + (float)this.e.d().b() + this.i);
      if (var1.i() < (float)this.e.n().d()) {
         float var3 = ((float)this.e.n().d() - var1.i()) / 2.0F;
         var1 = new com.aspose.cells.b.a.b.zq(var1.f(), var1.g() - var3, var1.h(), (float)this.e.n().d());
      }

      if (!this.e.t().equals("\n")) {
         zbul.a(this.a, this.e, var1, this.e.t(), this.e.s(), this.e.n(), this.e.o(), this.e.p(), this.e.q());
      }
   }
}
